#include "web.h"
#include "ui_web.h"
#include"serve.h"
#include"clien.h"
#include<QMessageBox>


Web::Web(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Web)
{
    ui->setupUi(this);
}

Web::~Web()
{
    delete ui;
}


int onceServ=1;
void Web::on_servButton_clicked()
{if(onceServ==1){
    //this->hide();
    serve *s=new serve;
    s->show();
    onceServ=0;}
    else{
        QMessageBox::warning(this,"网络警告","请不要打开多个服务器");


    }
}

int onceClin=1;
void Web::on_clinButton_clicked()
{
    if(onceClin==1){
    //this->hide();
    clien *c=new clien;
    c->show();

    onceClin=0;}
else{
    QMessageBox::warning(this,"网络警告","请不要打开多个客户端");


}
}

